package helloworld;

import com.lmax.disruptor.EventFactory;

import java.util.Date;

/**
 * @author ChenJunhong
 * @date 2018/12/19
 * Description:
 * 订单工厂。用于Ringbuffer预加载数据的时候调用。
 */
public class OrderFactory implements EventFactory<Order> {

    public Order newInstance() {
        Order order = new Order();
        order.setCreateTime(new Date());
        return order;
    }
}
